#include <REGX52.h>
#include "Delay.h"
/**
  * @brief  获取独立按键的键码(哪个被按下)
  * @parm	无
  * @retval	独立按键的键码
  */
unsigned char soleKey()
{
	unsigned char keyNum = 0;
	if(P3_1 == 0){Delayms(20);while(P3_1 == 0);Delayms(20);keyNum = 1;}
	if(P3_0 == 0){Delayms(20);while(P3_0 == 0);Delayms(20);keyNum = 2;}
	if(P3_2 == 0){Delayms(20);while(P3_2 == 0);Delayms(20);keyNum = 3;}
	if(P3_3 == 0){Delayms(20);while(P3_3 == 0);Delayms(20);keyNum = 4;}
	return keyNum;
}